How to infer generic type of a generic

welcome to shbcf.ru